/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * YeastFrame.java
 *
 * Created on May 29, 2011, 4:56:23 PM
 */

package gbbmgmt;

import java.util.*;
import org.jdesktop.application.Action;
import javax.swing.JOptionPane;

/**
 *
 * @author chapmand
 */
public class YeastFrame extends javax.swing.JFrame {

    public ArrayList<String[]> Yeast;
    public ArrayList<String[]> Vendor;

    /** Creates new form YeastFrame */
    public YeastFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jComboBoxYeast = new javax.swing.JComboBox();
        jButtonFirst = new javax.swing.JButton();
        jButtonPrev = new javax.swing.JButton();
        jButtonNext = new javax.swing.JButton();
        jButtonLast = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel1 = new javax.swing.JLabel();
        jTextFieldYeastID = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jTextFieldYeastName = new javax.swing.JTextField();
        jTextFieldYeastDesc = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jButtonSubNewYeast = new javax.swing.JButton();
        jButtonYeastAdd = new javax.swing.JButton();
        jButtonModYeast = new javax.swing.JButton();
        jButtonExit = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jComboBoxVendor = new javax.swing.JComboBox();
        jCheckBoxYeastActive = new javax.swing.JCheckBox();
        jLabel12 = new javax.swing.JLabel();
        jLabelWearhouse = new javax.swing.JLabel();
        jLabelscode = new javax.swing.JLabel();
        jLabelStockCode = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        jComboBoxYeast.setName("jComboBoxYeast"); // NOI18N
        jComboBoxYeast.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                jComboBoxYeastPopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getActionMap(YeastFrame.class, this);
        jButtonFirst.setAction(actionMap.get("FirstRecord")); // NOI18N
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getResourceMap(YeastFrame.class);
        jButtonFirst.setText(resourceMap.getString("jButtonFirst.text")); // NOI18N
        jButtonFirst.setName("jButtonFirst"); // NOI18N

        jButtonPrev.setAction(actionMap.get("PrevRecord")); // NOI18N
        jButtonPrev.setText(resourceMap.getString("jButtonPrev.text")); // NOI18N
        jButtonPrev.setName("jButtonPrev"); // NOI18N

        jButtonNext.setAction(actionMap.get("NextRecord")); // NOI18N
        jButtonNext.setText(resourceMap.getString("jButtonNext.text")); // NOI18N
        jButtonNext.setName("jButtonNext"); // NOI18N

        jButtonLast.setAction(actionMap.get("LastRecord")); // NOI18N
        jButtonLast.setText(resourceMap.getString("jButtonLast.text")); // NOI18N
        jButtonLast.setName("jButtonLast"); // NOI18N

        jSeparator1.setName("jSeparator1"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jTextFieldYeastID.setEditable(false);
        jTextFieldYeastID.setName("jTextFieldYeastID"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jTextFieldYeastName.setName("jTextFieldYeastName"); // NOI18N

        jTextFieldYeastDesc.setName("jTextFieldYeastDesc"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jSeparator2.setName("jSeparator2"); // NOI18N

        jButtonSubNewYeast.setAction(actionMap.get("SubmitEntry")); // NOI18N
        jButtonSubNewYeast.setText(resourceMap.getString("jButtonSubNewYeast.text")); // NOI18N
        jButtonSubNewYeast.setName("jButtonSubNewYeast"); // NOI18N

        jButtonYeastAdd.setAction(actionMap.get("CreateNewYeast")); // NOI18N
        jButtonYeastAdd.setText(resourceMap.getString("jButtonYeastAdd.text")); // NOI18N
        jButtonYeastAdd.setName("jButtonYeastAdd"); // NOI18N

        jButtonModYeast.setAction(actionMap.get("ModifyRecord")); // NOI18N
        jButtonModYeast.setText(resourceMap.getString("jButtonModYeast.text")); // NOI18N
        jButtonModYeast.setName("jButtonModYeast"); // NOI18N

        jButtonExit.setAction(actionMap.get("ExitYeast")); // NOI18N
        jButtonExit.setText(resourceMap.getString("jButtonExit.text")); // NOI18N
        jButtonExit.setName("jButtonExit"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jComboBoxVendor.setName("jComboBoxVendor"); // NOI18N

        jCheckBoxYeastActive.setText(resourceMap.getString("jCheckBoxYeastActive.text")); // NOI18N
        jCheckBoxYeastActive.setName("jCheckBoxYeastActive"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jLabelWearhouse.setText(resourceMap.getString("jLabelWearhouse.text")); // NOI18N
        jLabelWearhouse.setName("jLabelWearhouse"); // NOI18N

        jLabelscode.setText(resourceMap.getString("jLabelscode.text")); // NOI18N
        jLabelscode.setName("jLabelscode"); // NOI18N

        jLabelStockCode.setText(resourceMap.getString("jLabelStockCode.text")); // NOI18N
        jLabelStockCode.setName("jLabelStockCode"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jComboBoxYeast, 0, 311, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonFirst)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonPrev)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonNext)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonLast)
                .addContainerGap())
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE)
            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jButtonModYeast)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonYeastAdd)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 206, Short.MAX_VALUE)
                .addComponent(jButtonExit)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel4))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jComboBoxVendor, 0, 278, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonSubNewYeast))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jTextFieldYeastID, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 67, Short.MAX_VALUE)
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelWearhouse)
                        .addGap(18, 18, 18)
                        .addComponent(jLabelscode)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelStockCode)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jCheckBoxYeastActive))
                    .addComponent(jTextFieldYeastName, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
                    .addComponent(jTextFieldYeastDesc, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jButtonPrev)
                    .addComponent(jButtonFirst)
                    .addComponent(jButtonNext)
                    .addComponent(jButtonLast)
                    .addComponent(jComboBoxYeast, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldYeastID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jCheckBoxYeastActive)
                    .addComponent(jLabelStockCode)
                    .addComponent(jLabelscode)
                    .addComponent(jLabelWearhouse)
                    .addComponent(jLabel12))
                .addGap(9, 9, 9)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldYeastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextFieldYeastDesc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonSubNewYeast)
                    .addComponent(jLabel4)
                    .addComponent(jComboBoxVendor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonModYeast)
                    .addComponent(jButtonExit)
                    .addComponent(jButtonYeastAdd))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jComboBoxYeastPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_jComboBoxYeastPopupMenuWillBecomeInvisible
        // TODO add your handling code here:
        String Itm = jComboBoxYeast.getSelectedItem().toString();

        for(String s[] : Yeast){
            if (s[1].equals(Itm)) {
                DBA.openDBCon();
                DBA.GetYeastData(s[0]);
                DBA.closeDBCon();
            }
        }

        SetData();
}//GEN-LAST:event_jComboBoxYeastPopupMenuWillBecomeInvisible

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new YeastFrame().setVisible(true);
            }
        });
    }

    public void LoadList(){
        DBA.openDBCon();
        Yeast = DBA.RunSQLQuery("SELECT YID,YeastName FROM Yeast");
        Vendor = DBA.RunSQLQuery("SELECT VID,VName From Vendors");
        DBA.closeDBCon();

        for(String s[] : Yeast){
            jComboBoxYeast.addItem(s[1]);
        }

        for(String s[] : Vendor){
            jComboBoxVendor.addItem(s[1]);
        }

        FirstRecord();
    }

    public void SetData(){
        jTextFieldYeastID.setText(Integer.toString(DBA.YID));
        jTextFieldYeastName.setText(DBA.YeastDesc);
        jTextFieldYeastDesc.setText(DBA.YeastVendDisc);

        DBA.openDBCon();
        String scode = DBA.ReturnStockCode(jLabelWearhouse.getText(), jTextFieldYeastID.getText());
        String StockNumber = String.format("%05d", Integer.parseInt(scode));
        DBA.GetStockCodeData(scode);
        DBA.closeDBCon();

        for(String s[] : Vendor){
            if (s[0].equals(Integer.toString(DBA.StockVendID))) {
                jComboBoxVendor.setSelectedItem(s[1]);
            }
        }

        jCheckBoxYeastActive.setSelected(DBA.YeastActive);

        jButtonSubNewYeast.setVisible(false);

        jLabelStockCode.setText(StockNumber);
    }

    @Action
    public void FirstRecord() {
        jComboBoxYeast.setSelectedIndex(0);

        String Itm = jComboBoxYeast.getSelectedItem().toString();

        for(String s[] : Yeast){
            if (s[1].equals(Itm)) {
                DBA.openDBCon();
                DBA.GetYeastData(s[0]);
                DBA.closeDBCon();
            }
        }
        SetData();
    }

    @Action
    public void PrevRecord() {
        if(jComboBoxYeast.getSelectedIndex()>=1){
            jComboBoxYeast.setSelectedIndex(jComboBoxYeast.getSelectedIndex()-1);
        }

        String Itm = jComboBoxYeast.getSelectedItem().toString();

        for(String s[] : Yeast){
            if (s[1].equals(Itm)) {
                DBA.openDBCon();
                DBA.GetYeastData(s[0]);
                DBA.closeDBCon();
            }
        }
        SetData();
    }

    @Action
    public void NextRecord() {
        if(jComboBoxYeast.getSelectedIndex() <= (jComboBoxYeast.getItemCount()-2)){
            jComboBoxYeast.setSelectedIndex(jComboBoxYeast.getSelectedIndex()+1);
        }

        String Itm = jComboBoxYeast.getSelectedItem().toString();

        for(String s[] : Yeast){
            if (s[1].equals(Itm)) {
                DBA.openDBCon();
                DBA.GetYeastData(s[0]);
                DBA.closeDBCon();
            }
        }
        SetData();
    }

    @Action
    public void LastRecord() {
        jComboBoxYeast.setSelectedIndex(jComboBoxYeast.getItemCount()-1);

        String Itm = jComboBoxYeast.getSelectedItem().toString();

        for(String s[] : Yeast){
            if (s[1].equals(Itm)) {
                DBA.openDBCon();
                DBA.GetYeastData(s[0]);
                DBA.closeDBCon();
            }
        }
        SetData();
    }

    @Action
    public void ModifyRecord() {
        int response = JOptionPane.showConfirmDialog(null,
                "This will modify yeast data, continue?",
                "Warning",JOptionPane.WARNING_MESSAGE);

        if (response == 0){
            DBA.openDBCon();

            String vend = jComboBoxVendor.getSelectedItem().toString();
            String VID = "0";

            for(String s[] : Vendor){
                if (s[1].equals(vend)) {
                    VID = s[0];
                }
            }

            String YeastID = jTextFieldYeastID.getText();

            String query = "UPDATE Yeast SET YeastName='" +
                        jTextFieldYeastName.getText() + "',YeastDesc='" +
                        jTextFieldYeastDesc.getText() + "',YeastActive='" +
                        Integer.toString((jCheckBoxYeastActive.isSelected())?1:0) +
                        "' WHERE YID = '" + YeastID + "'";
            DBA.RunSQLUpdateQuery(query);

            int StID = Integer.parseInt(jLabelStockCode.getText());

            query = "UPDATE StockCode SET StockVendID='" +
                    VID + "' WHERE StockID = '" + Integer.toString(StID) + "'";
            DBA.RunSQLUpdateQuery(query);

            DBA.GetYeastData(YeastID);
            DBA.closeDBCon();

            SetData();
        }
    }

    @Action
    public void ExitYeast() {
        dispose();
    }

    @Action
    public void CreateNewYeast() {
        //set which buttons should be visible.
        jButtonSubNewYeast.setVisible(true);
        jButtonYeastAdd.setVisible(false);
        jButtonFirst.setVisible(false);
        jButtonLast.setVisible(false);
        jButtonNext.setVisible(false);
        jButtonPrev.setVisible(false);
        jButtonModYeast.setVisible(false);
        jComboBoxYeast.setVisible(false);
        jTextFieldYeastID.setVisible(false);
        jLabelStockCode.setVisible(false);
        jLabelscode.setVisible(false);

        //reset all text fields.
        jTextFieldYeastName.setText("");
        jTextFieldYeastDesc.setText("");
        jCheckBoxYeastActive.setSelected(true);
        
    }

    @Action
    public void SubmitEntry() {
        int response = JOptionPane.showConfirmDialog(null,
                "Warning, this record will be added to the database, continue?",
                "Warning",JOptionPane.WARNING_MESSAGE);
        if (response == 0){

            String vend = jComboBoxVendor.getSelectedItem().toString();
            String VID = "0";

            for(String s[] : Vendor){
                if (s[1].equals(vend)) {
                    VID = s[0];
                }
            }

            String fields = "YeastName,YeastDesc,YeastActive";
            String query = "'" +
                    jTextFieldYeastName.getText() + "','" +
                    jTextFieldYeastDesc.getText() + "','" +
                    Integer.toString((jCheckBoxYeastActive.isSelected())?1:0) + "'";


            DBA.openDBCon();
            DBA.RunSQLInsertQuery("Yeast",fields,query);
            //String MaID = DBA.GetLastIndex("Yeast", "YID");
            String MaID = Integer.toString(Global.lastInsertID);
            DBA.closeDBCon();

            DBA.openDBCon();
            String WhID = "120";
            fields = "TableID,WHID,StockVendID";
            query = "'" + MaID + "','" + WhID + "','" + VID + "'";
            DBA.RunSQLInsertQuery("StockCode",fields,query);
            DBA.closeDBCon();
        }

        //set which buttons should be visible.
        jButtonSubNewYeast.setVisible(false);

        //Show buttons
        jButtonYeastAdd.setVisible(true);
        jButtonFirst.setVisible(true);
        jButtonLast.setVisible(true);
        jButtonNext.setVisible(true);
        jButtonPrev.setVisible(true);
        jButtonModYeast.setVisible(true);
        jComboBoxYeast.setVisible(true);
        jTextFieldYeastID.setVisible(true);
        jLabelStockCode.setVisible(true);
        jLabelscode.setVisible(true);

        jComboBoxYeast.removeAllItems();
        LoadList();
        LastRecord();
       
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonExit;
    private javax.swing.JButton jButtonFirst;
    private javax.swing.JButton jButtonLast;
    private javax.swing.JButton jButtonModYeast;
    private javax.swing.JButton jButtonNext;
    private javax.swing.JButton jButtonPrev;
    private javax.swing.JButton jButtonSubNewYeast;
    private javax.swing.JButton jButtonYeastAdd;
    private javax.swing.JCheckBox jCheckBoxYeastActive;
    private javax.swing.JComboBox jComboBoxVendor;
    private javax.swing.JComboBox jComboBoxYeast;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabelStockCode;
    private javax.swing.JLabel jLabelWearhouse;
    private javax.swing.JLabel jLabelscode;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTextField jTextFieldYeastDesc;
    private javax.swing.JTextField jTextFieldYeastID;
    private javax.swing.JTextField jTextFieldYeastName;
    // End of variables declaration//GEN-END:variables

}
